package business.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import business.bean.PanduanForm;
import struts.annotation.Controller;
import struts.annotation.RequestMapping;
import struts.bean.ActionForm;
import struts.interfaces.Action;
@Controller
@RequestMapping("panAction")
public class PanAction  implements Action{ 

	@Override
	@RequestMapping("execute.do")
	public String execute(HttpServletRequest request,HttpServletResponse response, ActionForm form, Map<String, String> actionForward) {
		System.out.println("execute.do");
		String url="shibai";
		PanduanForm pdform=(PanduanForm) form;
		if("nnn".equals(pdform.getName())){
			url="chenggong";
		}
		return actionForward.get(url);
	}
	
	
	@RequestMapping("panduan.do")
	public String panduan(HttpServletRequest request,HttpServletResponse response){
		System.out.println("panduan.do");
		String name=request.getParameter("name");
		String url="/view/shibai.jsp";
		if(name.equals("aaa")){
			url="/view/chenggong.jsp";
		}
		return url;
	}
	
	
	

}
